package com.gdufe.studytogether.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gdufe.studytogether.domain.pojo.Group;
import com.gdufe.studytogether.domain.vo.GroupDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface GroupMapper extends BaseMapper<Group> {
    List<Group> listGroup(Integer uid);
    List<Integer> getGroupIdByUIdAndCid(@Param("uid") Integer uid, @Param("cid") Integer cid);
    Integer deleteUserGroupByGid(Integer id);

    Integer addUserGroup(@Param("uid") Integer uid,@Param("gid") Integer gid,@Param("cid") Integer cid);
    Integer joinGroup(Integer id);

    Integer deleteUserGroupByGidAndUid(@Param("gid") Integer gid, @Param("uid")Integer uid);
    Integer countdownGroupSize(Integer id);
    List<Group> listMyGroup(Integer competitionId,String groupName,Integer id,Integer uid);
}
